package crud.client.authentication;

import java.io.Serializable;

import com.google.gwt.user.client.rpc.IsSerializable;

import crud.client.data.Bonus;
import crud.client.data.Societe;
import crud.client.data.authentication.AuthenticatedUserAdapter;
import crud.client.data.authentication.Authentication;
import crud.client.data.authentication.Right;
import crud.client.data.authentication.User;

public class AuthenticatedUserAdapterImpl implements AuthenticatedUserAdapter,  Serializable, IsSerializable
{

	@Override
	public User getAuthenticatedUser()
	{
		User user = new User();
			user.setName("Eric");
			
			Authentication authentication = new Authentication();
			user.setAuthentication(authentication);
			authentication.setAdmin(true);
			authentication.addRight(Bonus.class.getName(), Right.NONE);
			authentication.addRight(Societe.class.getName(), Right.VISUALISATION);
		return user;
	}

}
